package cn.itcast.consumer.client;

import cn.itcast.consumer.pojo.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author 虎哥
 */
@Slf4j
@Component
public class UserClientFallback implements UserClient {
    @Override
    public User queryUserById(Long id) {
        // 当UserClient的queryUserById 失败时的逻辑处理
        log.error("远程调用查询用户失败。");
        return new User();
    }
}
